//
//  NSString+YY.h
//  ToolLibrary
//
//  Created by 蓓蕾 on 2024/1/8.
//  Copyright © 2024 Yang. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (YY)
/** 将字符串切割成数组【类方法】 */
+(NSArray *)slicingString:(NSString *)slicingString;
/** 将字符串切割成数组【实例方法】 */
-(NSArray *)slicingString;

// 获取文本宽度
- (CGFloat)yy_maxWidthWithFont:(UIFont*)font Height:(CGFloat)height Alignment:(NSTextAlignment)alignment LinebreakMode:(NSLineBreakMode)linebreakMode LineSpace:(CGFloat)lineSpace;

- (CGFloat)yy_maxWidthWithFont:(UIFont*)font Height:(CGFloat)height;

- (CGFloat)yy_maxHeightWithFont:(UIFont*)font Width:(CGFloat)width;
/// 获取文本高度

/// 获取文本高度
/// @param font 字体
/// @param width 宽度
/// @param alignment 对齐方式
/// @param linebreakMode 文本的显示方式
/// @param lineSpace 行高
- (CGFloat)yy_maxHeightWithFont:(UIFont*)font Width:(CGFloat)width Alignment:(NSTextAlignment)alignment LinebreakMode:(NSLineBreakMode)linebreakMode LineSpace:(CGFloat)lineSpace;

/// 获取文本高度
/// @param font 字体
/// @param width 字符串宽度
/// @param paragraphStyle 文本段落排版格式
- (CGFloat)yy_maxHeightWithFont:(UIFont*)font Width:(CGFloat)width ParagraphStyle:(NSParagraphStyle *)paragraphStyle;

+(BOOL)isBlankString:(NSString *)string;
-(BOOL)isBlank;

+(BOOL)isNotBlankString:(NSString *)string;
-(BOOL)isNotBlank;

@end

NS_ASSUME_NONNULL_END
